import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Recruit from "../views/Recruit.vue"
import Massage from "../views/Massage.vue"
import Main from '../views/Main.vue'
import My from '../views/My.vue'
import user from '../components/user.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/Home',
    name: 'Home',
    component: Home
  },
  {
    path: '/Recruit',
    name: 'Recruit',
    component: Recruit
  },
  {
    path: '/Massage',
    name: 'Massage',
    component: Massage
  },
  {
    path: '/Main',
    name: 'Main',
    component: Main
  },
  {
    path: '/My',
    name: 'My',
    component: My
  },
  {
    path: '/user/:id',
    name: 'user',
    component: user
  },
  {
    path:'/',
    redirect:'/Home'
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
